package org.eztouch.sys.service;

import java.util.List;

import org.eztouch.sys.cache.SysDicCacheService;
import org.eztouch.sys.entity.SysDic;
import org.eztouch.sys.facade.SysDicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Dubbo服务接口实现 
 * 
 * @author eztouch
 */
@Service
public class SysDicServiceImpl implements SysDicService{
	@Autowired
	private SysDicCacheService sysDicCacheService;

	@Override
	public SysDic selectByTypeAndKey(String dicType, String dicKey) {
		return sysDicCacheService.selectByValue(dicType);
//		return sysDicCacheService.selectByTypeAndKey(dicType,dicKey);
	}

	@Override
	public boolean insert(SysDic sysDic) {
		return sysDicCacheService.insert(sysDic);
	}

	@Override
	public List<SysDic> selectByType(String dicType) {
		return sysDicCacheService.selectByType(dicType);
	}

	@Override
	public void update(long tid) {
		sysDicCacheService.udpate(tid);
	}

	@Override
	public List<SysDic> selectByListIds(List<Long> ids) {
		return sysDicCacheService.selectByListIds(ids);
	}
}
